<head>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
    <script type="text/javascript">
        function ShowResponse(){
            var div_radiobutton = document.getElementById("div_radiobutton");
            var div_none = document.getElementById("div_none");
            var div_textarea = document.getElementById("div_textarea");
            var div_checkbox = document.getElementById("div_checkbox");
            var div_string = document.getElementById("div_string");
            var div_float = document.getElementById("div_float");
            var div_date = document.getElementById("div_date");
            var div_custom = document.getElementById("div_custom");
            var div_dynamic = document.getElementById("div_dynamic");
            var div_dropdown = document.getElementById("div_dropdown");
            var div_int = document.getElementById("div_int");
            var div_display = document.getElementById("div_display");
            var TypeName = "${responseName}";

            if (TypeName=="Please Select" || TypeName=="Yes/No" || TypeName=="No/Yes" || TypeName=="Social Security Number" || TypeName==" Phone Number" || TypeName=="Email Address" || TypeName=="US States" ){
                div_custom.style.display="none";
                div_dynamic.style.display="none";
                div_radiobutton.style.display="none";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (TypeName=="Display"){
            	div_display.style.display="";
                div_custom.style.display="none";
                div_dynamic.style.display="none";
                div_radiobutton.style.display="none";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
            }
            if (TypeName=="Custom"){
                //check exist session response type, if exist then delete it
                div_custom.style.display="";
                div_dynamic.style.display="none";
                div_radiobutton.style.display="none";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (TypeName=="Dynamic"){
                div_dynamic.style.display="";
                div_custom.style.display="none";
                div_radiobutton.style.display="none";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_dropdown.style.display="none";
                div_display.style.display="none";
            }
            //----------
            var uiControlName = "${uiControlName}";
            var dateTypeName = "${dateTypeName}";
            if (uiControlName=="Radio Button"){
                div_radiobutton.style.display="";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";

            }
            if (uiControlName=="Dropdown"){
                div_dropdown.style.display="";
                div_radiobutton.style.display="none";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName=="Check Box"){
                div_checkbox.style.display="";
                div_none.style.display="none";
                div_textarea.style.display="none";
                div_radiobutton.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_date.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName=="Please Select" || TypeName=="Text Box" || TypeName=="Text Area"){
                div_date.style.display="none";
                div_radiobutton.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            //-----
            if ((uiControlName=="Text Box" && dateTypeName=="Boolean") || (uiControlName=="Text Box" && dateTypeName=="Boolean")){
                div_date.style.display="none";
                div_radiobutton.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if ((uiControlName == "Text Box" && dateTypeName=="String") || (uiControlName == "Text Area" && dateTypeName=="Date") ||  (uiControlName == "Text Area" && TypeName=="Float")){
                div_date.style.display="none";
                div_radiobutton.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName == "Text Box" && dateTypeName=="Date"){
                div_date.style.display="";
                div_radiobutton.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName == "Text Area" && dateTypeName=="String"){
                div_textarea.style.display="";
                div_radiobutton.style.display="none";
                div_date.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_float.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName == "Text Box" && dateTypeName=="String"){
                div_string.style.display="";
                div_radiobutton.style.display="none";
                div_textarea.style.display="none";
                div_checkbox.style.display="none";
                div_date.style.display="none";
                div_float.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName == "Text Box" && dateTypeName=="Float"){
                div_float.style.display="";
                div_radiobutton.style.display="none";
                div_date.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_textarea.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_int.style.display="none";
                div_display.style.display="none";
            }
            if (uiControlName == "Text Box" && dateTypeName=="Integer"){
                div_int.style.display="";
                div_float.style.display="none";
                div_radiobutton.style.display="none";
                div_date.style.display="none";
                div_checkbox.style.display="none";
                div_string.style.display="none";
                div_textarea.style.display="none";
                div_none.style.display="none";
                div_dropdown.style.display="none";
                div_display.style.display="none";
            }

        }
	$(document).ready(function(){
		var content = $("#text").val();
		$(".rte_editor").RTE(content, '<%=request.getContextPath()%>/images/rte/');
	});
    </script>

<style type="text/css" media="all">
.rte_box { width:230px; height:226px; padding:0px 3px; margin:0px auto; /*border:#FF9900 1px solid;*/}
.rte_box iframe{ margin:0px; padding:0px; width:230px; height:226px; border:1px;}
.bar{ margin:0px auto; padding:0px 3px; height:25px; width:240px; font-size:14px;}

.bar ul{
	border:#FFFFFF 1px solid;
	background-color:#E6E6E6;
	cursor:pointer;
	height:25px;
	font-size:12px;
	margin: 0px;
	padding: 0px;
}

li {
	list-style-type: none;
}

.bar ul li {
	float: left;
	height: 20;
}

.bar ul li a {
	display: block;
	height: 20;
	border: 0px;
	text-decoration: none;
}

.bar ul li a img{
	border: 0px;
	/*text-decoration: none;*/
}
</style>
</head>


<!--START: conent -->

<div class="content2" id="general">
    <div class="insider">
        <div class="corners">
            <div class="corners_top"></div>
            <div class="column1">
                <div class="col_l">
                    <table width="440" border="0" cellspacing="4"
                           class="formlayout_table">
                        <tr>
                            <th width="188">
                                <label>
                                    <spring:message code="question.id" />:
                                </label>
                            </th>
                            <td width="240">
                                ${question.refId}
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label>
                                    <spring:message code="question.version" />:
                                </label>
                            </th>
                            <td>
                                ${question.version}
                                <br />
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label>
                                    Name:
                                </label>
                            </th>
                            <td class="bg_n">
                                <input name="name" id="name" type="text" class="input3" value="${question.name}" maxlength="255"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label>
                                    Vocabulary Name:
                                </label>
                            </th>
                            <td class="bg_n">
                                <input name="vocabularyname" id="vocabularyname" type="text" class="input3" value="${question.vocabularyname}" maxlength="255"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label>
                                    <spring:message code="question.text" />:
                                </label>
                            </th>
                            <td class="bg_n">
                                <textarea name="text" id="text" class="textarea2 rte_editor" style="height:9em;display:none" onkeypress="if(this.value.length >=1999) return false;" onpaste="if(this.value.length >=1999) return false;">${question.text}</textarea>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label>
                                    <spring:message code="question.description" />:
                                </label>
                            </th>
                            <td class="bg_n">
                                <textarea name="description" id="description" class="textarea2" onkeypress="if(this.value.length >=255) return false;" onpaste="if(this.value.length >=255) return false;">${question.description}</textarea>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                <label>
                                    <spring:message code="question.helptext" />:
                                </label>
                            </th>
                            <td class="bg_n">
                                <textarea name="helpText" id="helpText" class="textarea2" onkeypress="if(this.value.length >=255) return false;" onpaste="if(this.value.length >=255) return false;">${question.helpText}</textarea>
                            </td>
                        </tr>
                    </table>
                </div>
                <table width="283" border="0" cellspacing="4"
                       class="formlayout_table fr">
                    <tr>
                        <th width="159">
                            <label>
                                <spring:message code="question.siblingid" />:
                            </label>
                        </th>
                        <td width="111">
                            ${question.sibling.refId}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label>
                                <spring:message code="question.siblingversion" />:
                            </label>
                        </th>
                        <td>
                            ${question.sibling.version}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label>
                                <spring:message code="question.status" />:
                            </label>
                        </th>
                        <td>
                            ${question.questionStatusType.code}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label>
                                <spring:message code="question.availability" />:
                            </label>
                        </th>
                        <td>
                            ${question.questionAvailabilityType.code}
                        </td>
                    </tr>
                    <tr>
                        <th><label><spring:message code="application.lastmodifieddate" />:</label></th>
                        <td>
                            <c:if test="${isEdit=='IS_EDIT'}">
                                <fmt:formatDate value="${question.modifiedOn}" pattern="dd-MMM-yyyy" />
                            </c:if>
                        </td>
                    </tr>
                    <tr>
                        <th><label><spring:message code="application.lastmodifiedby" />:</label></th>
                        <td>
                            <c:if test="${isEdit=='IS_EDIT'}">
                            ${question.modifiedBy.username}
                            </c:if>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label>
                                <spring:message code="question.retiredby" />:
                            </label>
                        </th>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label>
                                <spring:message code="question.retireddate" />:
                            </label>
                        </th>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <label>
                                <spring:message code="question.retirednotes" />:
                            </label>
                        </th>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <table width="750" border="0" cellspacing="4"
                       class="formlayout_table cb">
                    <tr>
                        <th width="190"><label><spring:message code="question.responsetype" />:</label></th>
                        <td width="543" class=" bg_n radio_button">
                            <select name="Responsetype" id="Responsetype"
                                    onchange="ChangeType(this.options[this.selectedIndex].text)">
                                <option value="0">
                                    Please Select
                                </option>
                                <option value="Custom"
                                        <c:if test="${responseName=='Custom'}">selected</c:if>
                                        >
                                    Custom
                                </option>
                                <option value="Dynamic" <c:if test="${responseName=='Dynamic'}">selected</c:if>>
                                    Dynamic
                                </option>
                                <c:forEach var="restype" items="${restype}">
                                    <option value="${restype.responseTypeId}" <c:if test="${restype.name eq responseName}">selected</c:if>>
                                        ${restype.name}
                                    </option>
                                </c:forEach>
                            </select>
                        </td>
                    </tr>
                </table>
                <div id="div_custom" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table cb">
                        <tr>
                            <th width="190"><label>UI Control:</label></th>
                            <td width="270" class="bg_n radio_button">
                                <select name="Custom_UIControl" id="Custom_UIControl" onchange="ChangeTypeBy(this.options[this.selectedIndex].text)">
                                    <option value="0">
                                        Please Select
                                    </option>
                                    <c:forEach var="custom_uicontrol" items="${custom_uicontrol}">
                                        <option value="${custom_uicontrol.name}" <c:if test="${custom_uicontrol.name eq uiControlName}">selected</c:if>>
                                            ${custom_uicontrol.name}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                            <th width="160"><label id="Custom_DataType_label">Data Type:</label></th>
                            <td width="110" class="bg_n radio_button">
                                <select name="Custom_DataType" id="Custom_DataType" onchange="ChangeCustomBy(this.options[this.selectedIndex].text)">
                                    <option value="0">
                                        Please Select
                                    </option>
                                    <c:forEach var="datatype" items="${datatype}">
                                        <option value="${datatype.code}" <c:if test="${datatype.name eq dateTypeName}">selected</c:if>>
                                            ${datatype.name}
                                        </option>
                                    </c:forEach>                                    
                                </select>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="div_dynamic" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table cb">
                        <tr>
                            <th width="190"><label>UI Control:</label></th>
                            <td width="270" class="bg_n radio_button">
                                <select name="Dynamic_UIControl" id="Dynamic_UIControl" onchange="ChangeTypeBy(this.options[this.selectedIndex].text)">
                                    <option value="0">
                                        Please Select
                                    </option>
                                    <c:forEach var="dynamic_uicontrol" items="${dynamic_uicontrol}">
                                        <option value="${dynamic_uicontrol.name}" <c:if test="${dynamic_uicontrol.name eq uiControlName}">selected</c:if>>
                                            ${dynamic_uicontrol.name}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                            <th width="160"><label id="Dynamic_DataType_label">Data Type:</label></th>
                            <td width="110" class="bg_n radio_button">
                                <select name="Dynamic_DataType" id="Dynamic_DataType">
                                    <option value="0">
                                        Please Select
                                    </option>
                                    <c:forEach var="datatype" items="${datatype}">
                                        <option value="${datatype.code}" <c:if test="${datatype.name eq dateTypeName}">selected</c:if>>
                                            ${datatype.name}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="div_none" style="display:none;">

                </div>
                <div id="div_checkbox" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table cb">
                        <tr>
                            <th>&nbsp;</th>
                            <td class="response_type_check"><dl class="edit">
                                    <c:if test="${uiControlName=='Check Box'}">
                                        <c:forEach var="lresponseEntity" items="${lresponseEntity}">
                                            <dd id='Rsponse${lresponseEntity.responseEntryId}' onclick=CheckIt(this,'${lresponseEntity.responseEntryId}')><div><strong>${lresponseEntity.label}</strong><em>${lresponseEntity.value}</em></div></dd>
                                        </c:forEach>
                                    </c:if>
                            </dl></td>
                        </tr>
                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td class="response_type_input">
                                <input id="resp_id_check" type="hidden" value="" />
                                <input id="resp_label_check" type="text" class="label" maxlength="220"/>
                                <input id="resp_value_check" type="text" class="value" maxlength="220"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td align="right">
                                <img src="<%=request.getContextPath()%>/images/btn/btn_delete.gif" width="76" height="23"
                                     class="btn" id="delresp_check"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_move_up.gif" width="123" height="23"
                                     class="btn" id="moveup_check"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_move_down.gif" width="122" height="23"
                                     class="btn" id="movedown_check"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_update.gif" width="81" height="23"
                                     class="btn" id="addresp_check"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_add.gif" width="59" height="23"
                                     class="btn" id="addresp_check_add"/>
                            </td>
                        </tr>
                        <tr>
                            <th><label>Entries:</label></th>
                            <td><input type="text" id="entries_value_check" size="2" readonly="readonly" style="border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px" value="${entitys}"/></td>
                        </tr>
                        <tr>
                            <th width="190"><label>Max Selections:</label></th>
                            <c:if test="${uiControlName=='Check Box'}">
                                <td width="543"><input name="maxResponses_sq_checkbox" id="maxResponses_sq_checkbox" type="text" value="${question.maxResponses}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${uiControlName!='Check Box'}">
                                <td width="543"><input name="maxResponses_sq_checkbox" id="maxResponses_sq_checkbox" type="text" maxlength="255"/></td>
                            </c:if>
                        </tr>
                    </table>
                </div>
                <div id="div_radiobutton" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table cb">
                        <tr>
                            <th width="190">&nbsp;</th>
                            <td class="response_type"><dl class="edit">
                                    <c:if test="${uiControlName=='Radio Button'}">
                                        <c:forEach var="lresponseEntity" items="${lresponseEntity}">
                                            <dd id='Rsponse${lresponseEntity.responseEntryId}' onclick=CheckIt(this,'${lresponseEntity.responseEntryId}')><div><strong>${lresponseEntity.label}</strong><em>${lresponseEntity.value}</em></div></dd>
                                        </c:forEach>
                                    </c:if>
                            </dl></td>
                        </tr>
                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td class="response_type_input">
                                <input id="resp_id" type="hidden" value="" />
                                <input id="resp_label" type="text" class="label" maxlength="220"/>
                                <input id="resp_value" type="text" class="value" maxlength="220"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td align="right">
                                <img src="<%=request.getContextPath()%>/images/btn/btn_delete.gif" width="76" height="23"
                                     class="btn" id="delresp"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_move_up.gif" width="123" height="23"
                                     class="btn" id="moveup"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_move_down.gif" width="122" height="23"
                                     class="btn" id="movedown"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_update.gif" width="81" height="23"
                                     class="btn" id="addresp"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_add.gif" width="59" height="23"
                                     class="btn" id="addresp_add"/>
                            </td>
                        </tr>
                        <tr>
                            <th><label>Entries:</label></th>
                            <td><input type="text" id="entries_value" size="6" readonly="readonly" style="border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px" value="${entitys}"/></td>
                        </tr>
                    </table>
                </div>
                <div id="div_dropdown" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table cb">
                        <tr>
                            <th width="190">&nbsp;</th>
                            <td class="response_type_dropdown" ><dl class="edit">
                                    <c:if test="${uiControlName=='Dropdown'}">
                                        <c:forEach var="lresponseEntity" items="${lresponseEntity}">
                                            <dd id='Rsponse${lresponseEntity.responseEntryId}' onclick=CheckIt(this,'${lresponseEntity.responseEntryId}')><div><strong>${lresponseEntity.label}</strong><em>${lresponseEntity.value}</em></div></dd>
                                        </c:forEach>
                                    </c:if>
                            </dl></td>
                        </tr>
                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td class="response_type_input">
                                <input id="resp_id_dropdown" type="hidden" value="" />
                                <input id="resp_label_dropdown" type="text" class="label" maxlength="220"/>
                                <input id="resp_value_dropdown" type="text" class="value" maxlength="220"/>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                &nbsp;
                            </th>
                            <td align="right">
                                <img src="<%=request.getContextPath()%>/images/btn/btn_delete.gif" width="76" height="23"
                                     class="btn" id="delresp_dropdown"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_move_up.gif" width="123" height="23"
                                     class="btn" id="moveup_dropdown"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_move_down.gif" width="122" height="23"
                                     class="btn" id="movedown_dropdown"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_update.gif" width="81" height="23"
                                     class="btn" id="addresp_dropdown"/>
                                <img src="<%=request.getContextPath()%>/images/btn/btn_add.gif" width="59" height="23"
                                     class="btn" id="addresp_dropdown_add"/>
                            </td>
                        </tr>
                        <tr>
                            <th><label>Entries:</label></th>
                            <td><input type="text" id="entries_value_dropdown" size="6" readonly="readonly" style="border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px" value="${entitys}"/></td>
                        </tr>
                    </table>
                </div>
                <div id="div_textarea" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table">
                        <tr>
                            <th width="190"><label>Columns:</label></th>
                            <c:if test="${uiControlName=='Text Area'}">
                                <td width="543"><input name="width" id="width"  type="text" class="input3" value="${question.width}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${uiControlName!='Text Area'}">
                                <td width="543"><input name="width" id="width" type="text" class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Rows:</label></th>
                            <c:if test="${uiControlName=='Text Area'}">
                                <td><input name="rows" id="rows" type="text"  class="input3" value="${question.rows}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${uiControlName!='Text Area'}">
                                <td><input name="rows" id="rows" type="text"  class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Minimum Chars:</label></th>
                            <c:if test="${uiControlName=='Text Area'}">
                                <td><input name="minResponseValue_sq_textarea" id="minResponseValue_sq_textarea" type="text" class="input3" value="${question.minResponseValue}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${uiControlName!='Text Area'}">
                                <td><input name="minResponseValue_sq_textarea" id="minResponseValue_sq_textarea" type="text" class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Maximum Chars:</label></th>
                            <c:if test="${uiControlName=='Text Area'}">
                                <td><input name="maxResponseValue_sq_textarea" id="maxResponseValue_sq_textarea" type="text" class="input3" value="${question.maxResponseValue}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${uiControlName!='Text Area'}">
                                <td><input name="maxResponseValue_sq_textarea" id="maxResponseValue_sq_textarea" type="text" class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Edit Mask:</label></th>
                            <td><select name="Mask_textarea" class="select1">
                                    <option value="0">
                                        Please Select
                                    </option>
                                    <c:forEach var="datavilidate" items="${datavilidate}">
                                        <option value="${datavilidate.code}" <c:if test="${datavilidate.code eq question.responseType.dataValidation.code}">selected</c:if>>
                                            ${datavilidate.description}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="div_string" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table">
                        <tr>
                                    <th><label>Width(in pixels):</label></th>
                                     <c:if test="${uiControlName=='Text Box'}">
                                    <td><input name="width_string" type="text" id="rows" class="input3" maxlength="255" value="${question.width}"/></td>
                                    </c:if>
                                    <c:if test="${uiControlName!='Text Box'}">
                                    <td><input name="width_string" type="text" id="rows" class="input3" maxlength="255" value=""/></td>
                                    </c:if>
                                </tr>
                                <tr>
                                    <th><label>Minimum Chars:</label></th>
                                    <c:if test="${uiControlName=='Text Box'}">
                                    <td><input name="minResponseValue_sq_string" id="minResponseValue_sq_string" type="text" value="${question.minResponseValue}" class="input3" maxlength="255"/></td>
                                    </c:if>
                                    <c:if test="${uiControlName!='Text Box'}">
                                    <td><input name="minResponseValue_sq_string" id="minResponseValue_sq_string" type="text" value="" class="input3" maxlength="255"/></td>
                                    </c:if>
                                </tr>
                                <tr>
                                    <th><label>Maximum Chars:</label></th>
                                    <c:if test="${uiControlName=='Text Box'}">
                                    <td><input name="maxResponseValue_sq_string" id="maxResponseValue_sq_string" type="text" value="${question.maxResponseValue}" class="input3" maxlength="255"/></td>
                                    </c:if>
                                    <c:if test="${uiControlName!='Text Box'}">
                                    <td><input name="maxResponseValue_sq_string" id="maxResponseValue_sq_string" type="text" value="" class="input3" maxlength="255"/></td>
                                    </c:if>
                                </tr>
                        <tr>
                            <th width="190"><label>Units:</label></th>
                            <td width="543">
                                <input name="Units_string" id="Units_string" type="text" class="input3" maxlength="28" value="${question.responseType.units.code}"/>
                                
                            </td>
                        </tr>
                        <tr>
                            <th><label>Edit Mask:</label></th>
                            <td><select name="Mask_string" class="select1">
                                    <option value="0">
                                        Please Select
                                    </option>
                                    <c:forEach var="datavilidate" items="${datavilidate}">
                                        <option value="${datavilidate.code}" <c:if test="${datavilidate.code eq question.responseType.dataValidation.code}">selected</c:if>>
                                            ${datavilidate.description}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="div_float" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table">
                        <tr>
                            <th width="190"><label>Minimum Value:</label></th>
                            <c:if test="${dateTypeName=='Float'}">
                                <td width="543"><input name="minResponseValue_sq_float" id="minResponseValue_sq_float" type="text"class="input3" value="${question.minResponseValue}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${dateTypeName!='Float'}">
                                <td width="543"><input name="minResponseValue_sq_float" id="minResponseValue_sq_float" type="text"class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Maximum Value:</label></th>
                            <c:if test="${dateTypeName=='Float'}">
                                <td><input name="maxResponseValue_sq_float" type="text" id="maxResponseValue_sq_float" class="input3" value="${question.maxResponseValue}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${dateTypeName!='Float'}">
                                <td><input name="maxResponseValue_sq_float" type="text" id="maxResponseValue_sq_float" class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Significant Digits:</label></th>
                            <c:if test="${dateTypeName=='Float'}">
                                <td><input name="maxResponses_sq_float" id="maxResponses_sq_float" type="text" class="input3" value="${question.maxResponses}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${dateTypeName!='Float'}">
                                <td><input name="maxResponses_sq_float" id="maxResponses_sq_float" type="text" class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Units:</label></th>
                            <td>
                                 <input name="Units_float" id="Units_float" type="text" class="input3" maxlength="28" value="${question.responseType.units.code}"/>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="div_int" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table">
                        <tr>
                            <th width="190"><label>Minimum Value:</label></th>
                            <c:if test="${dateTypeName=='Integer'}">
                                <td width="543"><input name="minResponseValue_sq_int" id="minResponseValue_sq_int" type="text"class="input3" value="${question.minResponseValue}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${dateTypeName!='Integer'}">
                                <td width="543"><input name="minResponseValue_sq_int" id="minResponseValue_sq_int" type="text"class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Maximum Value:</label></th>
                            <c:if test="${dateTypeName=='Integer'}">
                                <td><input name="maxResponseValue_sq_int" type="text" id="maxResponseValue_sq_int" class="input3" value="${question.maxResponseValue}" maxlength="255"/></td>
                            </c:if>
                            <c:if test="${dateTypeName!='Integer'}">
                                <td><input name="maxResponseValue_sq_int" type="text" id="maxResponseValue_sq_int" class="input3" maxlength="255"/></td>
                            </c:if>
                        </tr>
                        <tr>
                            <th><label>Units:</label></th>
                            <td>
                                 <input name="Units_int" id="Units_int" type="text" class="input3" maxlength="28" value="${question.responseType.units.code}"/>
                               
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="div_date" style="display:none;">
                    <table width="750" border="0" cellspacing="4" class="formlayout_table">
                        <tr>
                            <th width="190"><label>Minimum Value:</label></th>
                            <td width="543"><input name="minResponseValue_sq_date" id="minResponseValue_sq_date" type="text" class="input3"
                                                       <c:if test="${uiControlName=='Text Box' && dateTypeName == 'Date'}">
                                                           value="${question.minResponseValue}"
                                                       </c:if>
                                                   maxlength="255"/></td>

                        </tr>
                        <tr>
                            <th><label>Maximum Value:</label></th>
                            <td><input name="maxResponseValue_sq_date" id="maxResponseValue_sq_date" type="text" class="input3"
                                           <c:if test="${uiControlName=='Text Box' && dateTypeName == 'Date'}">
                                               value="${question.maxResponseValue}"
                                           </c:if>
                                       maxlength="255"/></td>
                        </tr>
                    </table>
                </div>
                <div id="div_display" style="display:none;">
                            <table width="750" border="0" cellspacing="4" class="formlayout_table">
                                <tr>
                                    <th width="190"><label>Display Width:</label></th>
                                    <td width="543"><input name="display_width" id="display_width" type="text" class="input3" maxlength="100" value="${question.width}"/></td>
                                </tr>                                
                            </table>
                        </div>
            </div>
            <ul class="functions1">
                <li>
                    <a href="#" onclick="jumpAction('SUBMIT');"><img src="<%=request.getContextPath()%>/images/btn/functions1/btn_save.gif"
                                                                         width="122" height="23" class="btn" />
                    </a>
                </li>
                <li>
                    <a href="#" onclick="jumpAction('SUBMIT_AND_EXIT');"><img src="<%=request.getContextPath()%>/images/btn/functions1/btn_save_exit.gif"
                                                                                  width="122" height="23" class="btn" />
                    </a>
                </li>
                <li>
                    <a href="#" onclick="jumpAction('SUBMIT_AND_NEW');"><img
                            src="<%=request.getContextPath()%>/images/btn/functions1/btn_save_create_new.gif" alt=""
                            width="122" height="41" class="btn" />
                    </a>
                </li>
                <li>

                    <a href="list.html?from=cancel&checkSearch=list"><img src="<%=request.getContextPath()%>/images/btn/functions1/btn_cancel.gif"
                                                             alt="" width="122" height="23" class="btn" />
                    </a>

                </li>
            </ul>
            <div class="corners_bottom"></div>
        </div>
        <div class="message">
            ${questionerror}
          ${empty questionerror ? "" : "<br />"}
          ${questionmessage}
          ${empty questionmessage ? "" : "<br />"}
            <jsp:include page="validateMessage.jsp" />
        </div>
    </div>
</div>